import request from "@/utils/request";
/**
 * 活动详情
 * @param params
 * @returns
 */
export function activityDetailApi(params: Record<string, any>) {
  return request.post({
    url: "/lucky/activity/detail",
    data: params,
  });
}
/**
 * 核销订单
 * @param params
 * @returns
 */
export function cancelApi(params: Record<string, any>) {
  return request.post({
    url: "/lucky/order/cancel",
    data: params,
  });
}
/**
 * 创建订单
 * @param params
 * @returns
 */
export function editActivityOrderApi(params: Record<string, any>) {
  return request.post({
    url: "/lucky/order/edit",
    data: params,
  });
}
/**
 * 创建订单
 * @param params
 * @returns
 */
export function createActivityOrderApi(params: Record<string, any>) {
  return request.post({
    url: "/lucky/order/create",
    data: params,
  });
}
/**
 * 订单详情
 * @param params
 * @returns
 */
export function activityOrderDetailApi(params: Record<string, any>) {
  return request.post({
    url: "/lucky/order/detail",
    data: params,
  });
}
/**
 * 用户信息
 * @returns
 */
export function clientInfoApi() {
  return request.post({
    url: "/activity/client_info",
  });
}
/**
 * 用户抽奖信息
 * @param params
 * @returns
 */
export function userDrawInfoApi(params: Record<string, any>) {
  return request.post({
    url: "/lucky/activity/user_draw_info",
    data: params,
  });
}
/**
 * 码号详情
 * @param params
 * @returns
 */
export function getCodeDetail(params: Record<string, any>) {
  return request.post({
    url: "/lucky/code/detail",
    data: params,
  });
}
/**
 * 订单列表
 * @param params
 * @returns
 */
export function activityOrderListApi(params: Record<string, any>) {
  return request.post({
    url: "/lucky/order/list",
    data: params,
  });
}
/**
 * 获取抽奖次数
 * @param params
 * @returns
 */
export function userDrawResidueCountApi(params: Record<string, any>) {
  return request.post({
    url: "/lucky/activity/draw_num",
    data: params,
  });
}
/**
 * 检测抽奖是否合法
 * @param params
 * @returns
 */
export function checkDrawEligibleApi(params: Record<string, any>) {
  return request.post({
    url: "/lucky/activity/check_draw_eligible",
    data: params,
  });
}
export function activityListApi(params: Record<string, any>) {
  return request.post({
    url: "/lucky/activity/lists",
    data: params,
  });
}
export function merchantEditApi(
  merchantId: number,
  params: Record<string, any>
) {
  return request.post({
    url: `/lucky/merchant/edit/{id}`,
    data: params,
  });
}
export function merchantAddApi(params: Record<string, any>) {
  return request.post({
    url: "/lucky/merchant/add",
    data: params,
  });
}
export function merchantListsApi(params: Record<string, any>) {
  return request.post({
    url: "/lucky/merchant/lists",
    data: params,
  });
}
